#ifndef ALGORITHM_H
#define ALGORITHM_H

#include <QPushButton>
#include <QVBoxLayout>
#include <QWidget>
#include "graph.h"

class QPushButton;
class QVBoxLayout;
class QWidget;

template <typename T>
class Algorithm: public QWidget {
  // Publics Methods
  public:
    Algorithm(Graph<T>& graph, QWidget* parent = 0);
    virtual void constructUI() {}
    virtual void execute() {};

  private:
  // Privates Attributes
  QPushButton* executeButton;
  QVBoxLayout* mainLayout, * paramLayout;
  Graph<T>& graph;
};

template <typename T>
Algorithm<T>::Algorithm(Graph<T>& graph, QWidget* parent): QWidget(parent), graph(graph) {

  mainLayout = new QVBoxLayout(parent);

  QPushButton* ee = new QPushButton("ee", (QWidget*)this);
  mainLayout->addWidget(ee);

  constructUI();

  executeButton = new QPushButton(QString::fromUtf8("Éxecuter"), (QWidget*)this);
  mainLayout->addWidget(executeButton);
}

#endif
